package com.macro.mall.tiny.modules.foster.service;

import com.macro.mall.tiny.common.api.CommonResult;
import com.macro.mall.tiny.modules.foster.model.domain.AdminUserDetails;
import com.macro.mall.tiny.modules.foster.model.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.macro.mall.tiny.modules.foster.model.dto.AuthCodeDTO;
import com.macro.mall.tiny.modules.foster.model.dto.LoginDTO;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author zhuyi
 * @since 2024-03-26
 */
public interface UserService extends IService<User> {

    AdminUserDetails getUserByUsername(String username);

    String login(LoginDTO loginDTO);

    String getRoles(Long userId);

    CommonResult checkAuthCode(AuthCodeDTO authCodeDTO);

    CommonResult register(User user);

    CommonResult getUserById(Long id);

    CommonResult removeUserById(Long id);

    CommonResult updateUserById(User user);

    CommonResult updatePassword(LoginDTO loginDTO);
}
